-- GENERATED SPELL FOR [Vekh] --


function spell0_22305(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_22305', 3500, 1)
end

function spell1_22305(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(37583,pUnit)
pUnit:RegisterEvent('Sorts_22305', 620, 1)
end

function spell2_22305(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(37582,pUnit)
pUnit:RegisterEvent('Sorts_22305', 2000, 1)
end

function Sorts_22305(pUnit, Event)
local choix_sorts_22305 = math.random(0, 2)
if choix_sorts_22305 == 0 then
pUnit:RegisterEvent('spell0_22305', 1, 1)
end
if choix_sorts_22305 == 1 then
pUnit:RegisterEvent('spell1_22305', 1, 1)
end
if choix_sorts_22305 == 2 then
pUnit:RegisterEvent('spell2_22305', 1, 1)
end
end

function mob22305_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22305', math.random(1500, 3000), 1)
end

function mob22305_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22305_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22305_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22305, 1, 'mob22305_Action')
RegisterUnitEvent(22305, 2, 'mob22305_Leave')
RegisterUnitEvent(22305, 3, 'mob22305_Kill')
RegisterUnitEvent(22305, 4, 'mob22305_Die')
